<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
	xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head th:replace="dashboard/header :: header"></head>
<body>

	<!--
@desc 节假日设置 更新
@author WeiXiaoJin
@since 2019-12-28 09:39:27
-->

	<div layout:fragment="content">
		<div class="container-fluid content-main">
			<div class="animated fadeIn">
				<div class="row">
					<div class="col-sm-12">
						<div class="card">
							<div class="card-body">

								<form class="form-horizontal" id="modifyForm">

									<input type="hidden" name="id" th:value="${bean.id}" />
									
									<div class="form-group row margin-right-0">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">所属应用</label>
										<div class="col-md-9">
											<input class="form-control" 
												id="applicationIdLabel"
												th:value="${@pageHandle.applicationLabel(bean.applicationId)}" 
												type="text" 
												onclick="showApplication()"
												name="applicationIdLabel" 
												readonly="readonly"
												style="cursor: pointer" placeholder="所属应用"> <input
												type="hidden" name="applicationId" />
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">日期字符 </label>
										<div class="col-md-9">
											<div class="input-group date">
												<span class="input-group-addon"><i
													class="fa fa-calendar"></i></span> <input type="text"
													class="form-control time-input" id="laydate-demo-3"
													name="holidaysDate"
													th:value="${#dates.format(bean.holidaysDate, 'yyyy-MM-dd')}"
													data-type="date"
													data-format="yyyy-MM-dd"
													placeholder="yyyy-MM-dd" lay-key="3">
											</div>
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">是否为节假日 </label>
										<div class="col-md-9">
											<div class="radio">
												<label> <input type="radio" name="configType"
													value="1" th:checked="${bean.holidays == '1'}">是
												</label> <label> <input type="radio" name="configType"
													value="0" th:checked="${bean.holidays == '0'}">否
												</label>
											</div>
										</div>
									</div>
								</form>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<footer th:replace="dashboard/footer :: footer"></footer>
	<script type="text/javascript" th:src="@{/resources/js/project.js}"></script>

	<script type="text/javascript">
		$(function(){
			$('#modifyForm').validate({
				ignore: [],  
				rules: {
					applicationId: "required",
					holidaysDate: "required"
				}
			});
		}) ;
	
		function submitHandler() {
			var result = $.validate.form("modifyForm");
			if(result){
				var modifyUrl = ctx + "portal/ucenter/holidays/update";
				$.operate.save(modifyUrl, $('#modifyForm').serialize());
			}
		}
	</script>
</body>
</html>
